package com.lqm.mybatis.test;

import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import com.lqm.mapper.OrderMapper;
import com.lqm.model.Order;
import com.lqm.model.util.mybatisutil;

public class ordertest {
@Test
public void testList(){
	SqlSession session = null;
	try {
		session = mybatisutil.getSession(false);
		List<Order> orders = 
				session.getMapper(OrderMapper.class).getOrders();
		System.out.println(orders);
		
	} catch (Exception e) {
		e.printStackTrace();
	} finally{
		mybatisutil.close(session);
	}
	
}
}

